package com.dq.health.utils.data;

import java.util.HashSet;

public class SetUtil {

    public static HashSet<String> toSet(String value) {
        HashSet<String> result = new HashSet<>();

        if (value == null || value.trim().equals("")) {
            return result;
        }

        result.add(value);
        return result;
    }

    public static HashSet<String> toSet(Integer value) {
        HashSet<String> result = new HashSet<>();

        if (value == null || value == 0) {
            return result;
        }

        result.add(String.valueOf(value));
        return result;
    }

    public static HashSet<String> toSet(Long value) {
        HashSet<String> result = new HashSet<>();

        if (value == null || value == 0L) {
            return result;
        }

        result.add(String.valueOf(value));
        return result;
    }
}
